package com.hzncc.flowable_diboot.contract.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
* 合同变更 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-09-10
* Copyright © MyCorp
*/

@TableName("mdl_contract_audit_update")
@Getter @Setter @Accessors(chain = true)
public class ContractAuditUpdate extends BaseModel {
    private static final long serialVersionUID = 1728486026845144365L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 合同审批ID
     */
    @NotNull(message = "合同审批ID不能为空")
    @Length(max=32, message="合同审批ID长度应小于32")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contractAuditId;

    /**
     * 合同编码
     */
    @Length(max=100, message="合同编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contractCode;

    /**
     * 合同版本
     */
    @TableField()
    private Long contractVersion;

    /**
     * 合同变更标识
     */
    @Length(max=100, message="合同变更标识长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String updateKey;

    /**
     * 发货情况
     */
    @TableField()
    private String sendOutStatus;

    /**
     * 开票情况
     */
    @TableField()
    private String invoiceStatus;

    /**
     * 变更类型
     */
    @TableField()
    private String updateType;

    /**
     * 变更理由
     */
    @Length(max=100, message="变更理由长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String updateReason;

    /**
     * 是否补充物料编码
     */
    @TableField()
    private short addMaterial;

    /**
     * 申请人
     */
    @Length(max=100, message="申请人长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String applicant;

    /**
     * 申请时间
     */
    @TableField()
    private LocalDateTime applicantTime;

    /**
     * 变更前金额
     */
    @Length(max=100, message="变更前金额长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String preChangeAmount;

    /**
     * 变更后金额
     */
    @Length(max=100, message="变更后金额长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String changedAmount;

    /**
     * 变更前折扣
     */
    @Length(max=100, message="变更前折扣长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String preChangeDiscount;

    /**
     * 变更后折扣
     */
    @Length(max=100, message="变更后折扣长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String changedDiscount;

    /**
     * 变更前数量
     */
    @Length(max=100, message="变更前数量长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String preChangeNum;

    /**
     * 变更后数量
     */
    @TableField()
    private String changedNum;

    /**
     * 变更前单价
     */
    @TableField
    private String preChangePrice;

    /**
     * 变更后单价
     */
    @TableField
    private String changedPrice;

    /**
     * 其他变更类型
     */
    @Length(max=100, message="其他变更类型长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String otherUpdateType;

    /**
     * OA推送状态
     */
    @Length(max=100, message="OA推送状态长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String oaStatus;

    /**
     * 审核附件
     */
    @TableField
    private String auditAttachment;

    /**
     * 变更类型
     */
    @TableField
    private String changeType;

}